

<%@ page import="tvdi.Aluno" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'aluno.label', default: 'Aluno')}" />
        <title><g:message code="default.create.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.create.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${alunoInstance}">
            <div class="errors">
                <g:renderErrors bean="${alunoInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" >
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="nome"><g:message code="aluno.nome.label" default="Nome" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alunoInstance, field: 'nome', 'errors')}">
                                    <g:textField name="nome" value="${alunoInstance?.nome}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="nascimento"><g:message code="aluno.nascimento.label" default="Nascimento" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alunoInstance, field: 'nascimento', 'errors')}">
                                    <g:datePicker name="nascimento" precision="day" value="${alunoInstance?.nascimento}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="email"><g:message code="aluno.email.label" default="Email" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alunoInstance, field: 'email', 'errors')}">
                                    <g:textField name="email" value="${alunoInstance?.email}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="endereco"><g:message code="aluno.endereco.label" default="Endereco" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alunoInstance, field: 'endereco', 'errors')}">
                                    <g:textField name="endereco" value="${alunoInstance?.endereco}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cidade"><g:message code="aluno.cidade.label" default="Cidade" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alunoInstance, field: 'cidade', 'errors')}">
                                    <g:textField name="cidade" value="${alunoInstance?.cidade}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="estado"><g:message code="aluno.estado.label" default="Estado" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alunoInstance, field: 'estado', 'errors')}">
                                    <g:select name="estado" from="${alunoInstance.constraints.estado.inList}" value="${alunoInstance?.estado}" valueMessagePrefix="aluno.estado"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cep"><g:message code="aluno.cep.label" default="Cep" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alunoInstance, field: 'cep', 'errors')}">
                                    <g:textField name="cep" maxlength="8" value="${alunoInstance?.cep}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="telefone"><g:message code="aluno.telefone.label" default="Telefone" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alunoInstance, field: 'telefone', 'errors')}">
                                    <g:textField name="telefone" maxlength="8" value="${alunoInstance?.telefone}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="celular"><g:message code="aluno.celular.label" default="Celular" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alunoInstance, field: 'celular', 'errors')}">
                                    <g:textField name="celular" maxlength="8" value="${alunoInstance?.celular}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="modulo"><g:message code="aluno.modulo.label" default="Modulo" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alunoInstance, field: 'modulo', 'errors')}">
                                    <g:select name="modulo.id" from="${tvdi.Modulo.list()}" optionKey="id" value="${alunoInstance?.modulo?.id}"  />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
